package factory;

import dao.IUserDAO;
import dao.UserDAO;

public class Factory
{

    private static UserDAO userDAO  = null;
    private static Factory instance = null;

    public static synchronized Factory getInstance()
    {
        if (instance == null)
        {
            instance = new Factory();
        }
        return instance;
    }

    public IUserDAO getUserDAO()
    {
        if (userDAO == null)
        {
            userDAO = new UserDAO();
        }
        return userDAO;
    }
}